package com.xxl.job.executor.service.jobhandler;

import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class TestXxlJob {

    private static Logger logger = LoggerFactory.getLogger(TestXxlJob.class);


    /**
     * 1、简单任务示例（Bean模式）
     */
    @XxlJob("testHandler")
    public void testHandler() throws Exception {
        XxlJobHelper.log("XXL-JOB, Hello World.");

        logger.info("-------------测试------------------");
    }

}
